/*
 * match.h
 *
 *  Created on: Jan 24, 2012
 *      Author: marco
 */

#ifndef MATCH_H_
#define MATCH_H_
#include "worker.h"
#include "queue.h"

typedef struct offer_t {
	user *provider;
	int seats;
	int from;
	int to;
}offer_t;

typedef struct request_t {
	user *client;
	int from;
	int to;

}request_t;


typedef struct pairing_t {
	user *prov;
	user *client;
	char **cities;
	int hops;
}pairing_t;



void* match_start(void*);
void matching(queue* o, queue *r);

static void sigalarm_handler(int signum);

#endif /* MATCH_H_ */
